<?php 

//  create_user.php
//  Memento 3.0
//
//  Created by Christopher Burrows on 10-07-26
//  Copyright 2010 Team Memento. All rights reserved.
//
//    Description:
//  Receives a username and password via HTML POST to pass
//  to a function in functions.php, which creates a new
//  account and authenticates it (provides a session token).
//
//  10-07-26: File created (C. Burrows)
//
//  HTML POST Fields:
//  'username'  (string)
//  'password'  (string) [unencrypted]

include ($_SERVER['DOCUMENT_ROOT'].'/functions.php');

connect_to_database();

// Set the username and password from the form
$username = $_POST['username'];
$password = $_POST['password'];

create_user($username, $password);

?>
